<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="include/header_css::header('新增-菜单管理')"></head>
<body>
<div id="dpLTE" class="container-fluid" v-cloak>
    <table class="form" id="form">
        <tr>
            <td class="formTitle">类型</td>
            <td class="formValue">
                <label class="radio-inline"> <input type="radio"
                                                    name="type" value="menu" v-model="menu.type"/> 菜单
                </label> <label class="radio-inline"> <input type="radio"
                                                             name="type" value="btn" v-model="menu.type"/> 按钮
            </label>
            </td>
        </tr>
        <tr>
            <td class="formTitle">是否显示</td>
            <td class="formValue">
                <label class="radio-inline"> <input type="radio"
                                                    name="status" value="1" v-model="menu.status"/> 是
                </label> <label class="radio-inline"> <input type="radio"
                                                             name="status" value="0" v-model="menu.status"/> 否
            </label>
            </td>
        </tr>
        <tr>
            <td class="formTitle">名称<font face="宋体">*</font></td>
            <td class="formValue">
                <input type="text" class="form-control" v-model="menu.name" placeholder="菜单名称或按钮名称" isvalid="yes"
                       checkexpession="NotNull"/>
            </td>
        </tr>
        <tr>
            <td class="formTitle">上级菜单</td>
            <td class="formValue">
                <input type="text" class="form-control pointer" v-model="menu.parentName" @click="menuTree"
                       readonly="readonly" placeholder="一级菜单"/>
            </td>
        </tr>
        <tr v-if="menu.type == 'menu'">
            <td class="formTitle">URL</td>
            <td class="formValue">
                <input type="text" class="form-control" v-model="menu.url" placeholder="菜单URL"/>
            </td>
        </tr>
        <tr v-if="menu.type == 'btn'">
            <td class="formTitle">按钮码</td>
            <td class="formValue">
                <input type="text" class="form-control" v-model="menu.btnCode" placeholder="如：user_list"/>
            </td>
        </tr>
        <tr>
            <td class="formTitle">排序</td>
            <td class="formValue">
                <input type="text" class="form-control" v-model="menu.ordering" placeholder="排序号"/>
            </td>
        </tr>
        <tr v-if="menu.type == 'menu'">
            <td class="formTitle">图标</td>
            <td class="formValue">
                <input type="text" class="form-control" v-model="menu.icon" placeholder="图标，点击右边按钮选取图标 "/>
                <span class="input-button" title="选取图标" @click="selectIcon">...</span>
            </td>
        </tr>
    </table>
</div>
<div th:include="include/footer_js::footer"></div>
<script th:src="@{/js/menu/add.js}"></script>
</body>
</html>